/**
 * Copyright(c) 2013 Jade Techonologies Co., Ltd.
 *
 * History:
 *   14-7-29 下午1:14 Created by dwzhang
 */
package com.jade.framework.base.comm.impl;

import com.jade.framework.base.comm.ProtocolConfiguration;

/**
 * 简单的协议配置。
 *
 * @author dwzhang
 * @version 1.0 14-7-29 下午1:14
 */
public class SimpleConfiguration implements ProtocolConfiguration
{
    protected String name = "COMM";
    protected String host;
    protected int port;
    protected int connectTimeout = 30000;
    protected int soTimeout = 30000;
    protected boolean longTerm = false;
    protected int pingPeriod = 0;
    protected boolean autoConnect = false;
    protected int backlog = 128;
    protected int maxMessageLength = 8024;
    protected int windowSize = 128;
    protected int windowWaitTimeout = 10000;
    protected int windowMonitorInterval = 10000;
    protected int requestExpiryTimeout = 300000;

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public String getHost()
    {
        return host;
    }

    public void setHost(String host)
    {
        this.host = host;
    }

    public int getPort()
    {
        return port;
    }

    public void setPort(int port)
    {
        this.port = port;
    }

    public int getConnectTimeout()
    {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout)
    {
        this.connectTimeout = connectTimeout;
    }

    public int getSoTimeout()
    {
        return soTimeout;
    }

    public void setSoTimeout(int soTimeout)
    {
        this.soTimeout = soTimeout;
    }

    public boolean isLongTerm()
    {
        return longTerm;
    }

    public void setLongTerm(boolean longTerm)
    {
        this.longTerm = longTerm;
    }

    public int getPingPeriod()
    {
        return pingPeriod;
    }

    public void setPingPeriod(int pingPeriod)
    {
        this.pingPeriod = pingPeriod;
    }

    public boolean isAutoConnect()
    {
        return autoConnect;
    }

    public void setAutoConnect(boolean autoConnect)
    {
        this.autoConnect = autoConnect;
    }

    public int getBacklog()
    {
        return backlog;
    }

    public void setBacklog(int backlog)
    {
        this.backlog = backlog;
    }

    public int getMaxMessageLength()
    {
        return maxMessageLength;
    }

    public void setMaxMessageLength(int maxMessageLength)
    {
        this.maxMessageLength = maxMessageLength;
    }

    public int getWindowSize()
    {
        return windowSize;
    }

    public void setWindowSize(int windowSize)
    {
        this.windowSize = windowSize;
    }

    public int getWindowWaitTimeout()
    {
        return windowWaitTimeout;
    }

    public void setWindowWaitTimeout(int windowWaitTimeout)
    {
        this.windowWaitTimeout = windowWaitTimeout;
    }

    public int getWindowMonitorInterval()
    {
        return windowMonitorInterval;
    }

    public void setWindowMonitorInterval(int windowMonitorInterval)
    {
        this.windowMonitorInterval = windowMonitorInterval;
    }

    public int getRequestExpiryTimeout()
    {
        return requestExpiryTimeout;
    }

    public void setRequestExpiryTimeout(int requestExpiryTimeout)
    {
        this.requestExpiryTimeout = requestExpiryTimeout;
    }
}
